home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / internet-tools / connect-line / cl / devkit / c / include / clonline.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-13  |  7.7 KB  |  251 lines

  1. /*
  2. // clonline.library, Version 5.0
  3. //
  4. // Copyright 1995 by Mathias Mischler
  5. //
  6. // Definitons
  7. */
  8.  
  9. #ifndef CLONLINE_H
  10. #define CLONLINE_H
  11.  
  12. /* Some more includes, that there is no need of others in YOUR main */
  13.  
  14. #include <time.h>
  15. #include <proto/exec.h>
  16. #include <proto/dos.h>
  17. #include <dos/dos.h>
  18. #include <cl/types.h>
  19. #include <cl/lists.h>
  20. #include <cl/cl_user.h>
  21. #include <cl/UserShell.h>
  22.  
  23. /* Pragma Definitions */
  24.  
  25. #pragma libcall CLOnlineBase CLONL_Open 1e 801
  26. #pragma libcall CLOnlineBase CLONL_Close 24 00
  27. #pragma libcall CLOnlineBase CLONL_FlushInput 2a 00
  28. #pragma libcall CLOnlineBase CLONL_FlushOutput 30 00
  29. #pragma libcall CLOnlineBase CLONL_UpdateUser 36 00
  30. #pragma libcall CLOnlineBase CLONL_Normal 3c 00
  31. #pragma libcall CLOnlineBase CLONL_DeleteEOL 42 00
  32. #pragma libcall CLOnlineBase CLONL_DeleteLine 48 00
  33. #pragma libcall CLOnlineBase CLONL_InsertLine 4e 00
  34. #pragma libcall CLOnlineBase CLONL_BlueMode 54 00
  35. #pragma libcall CLOnlineBase CLONL_GotoXY 5a 1002
  36. #pragma libcall CLOnlineBase CLONL_Color 60 21003
  37. #pragma libcall CLOnlineBase CLONL_ClearScreen 66 00
  38. #pragma libcall CLOnlineBase CLONL_BlueRead 6c 2109805
  39. #pragma libcall CLOnlineBase CLONL_Wait 72 00
  40. #pragma libcall CLOnlineBase CLONL_DrawTitle 78 00
  41. #pragma libcall CLOnlineBase CLONL_Edit 7e 801
  42. #pragma libcall CLOnlineBase CLONL_RequesterSelect a8 190804
  43. #pragma libcall CLOnlineBase CLONL_GetLocale ae 00
  44. #pragma libcall CLOnlineBase CLONL_GetCatalog b4 00
  45. #pragma libcall CLOnlineBase CLONL_GetUserShell ba 00
  46. #pragma libcall CLOnlineBase CLONL_IsTTY c0 00
  47. #pragma libcall CLOnlineBase CLONL_GetString c6 801
  48. #pragma libcall CLOnlineBase CLONL_VPrintf cc 9802
  49. #pragma tagcall CLOnlineBase CLONL_Printf cc 9802
  50. #pragma libcall CLOnlineBase CLONL_VSPrintf d2 A9803
  51. #pragma tagcall CLOnlineBase CLONL_SPrintf d2 A9803
  52. #pragma libcall CLOnlineBase CLONL_DoCommand d8 9802
  53. #pragma libcall CLOnlineBase CLONL_SendMail de DBA9805
  54. #pragma libcall CLOnlineBase CLONL_GetKey e4 00
  55. #pragma libcall CLOnlineBase CLONL_FreeRange f0 801
  56. #pragma libcall CLOnlineBase CLONL_ParseExpression f6 0802
  57. #pragma libcall CLOnlineBase CLONL_Transfer fc 9802
  58. #pragma libcall CLOnlineBase CLONL_GetUserFullName 102 801
  59. #pragma libcall CLOnlineBase CLONL_GetNameVal 108 801
  60. #pragma libcall CLOnlineBase CLONL_IsKeyPressed 10e 00
  61. #pragma libcall CLOnlineBase CLONL_Continue 114 00
  62. #pragma libcall CLOnlineBase CLONL_AddShortMenu 11a 09803
  63. #pragma libcall CLOnlineBase CLONL_FreeShortMenu 120 801
  64. #pragma libcall CLOnlineBase CLONL_ShortMenuSelect 126 801
  65. #pragma libcall CLOnlineBase CLONL_TimeToStr 12c 8002
  66. #pragma libcall CLOnlineBase CLONL_StrToTime 132 9802
  67. #pragma libcall CLOnlineBase CLONL_AddGadget 138 1A90805
  68. #pragma libcall CLOnlineBase CLONL_GetGadget 13e 9802
  69. #pragma libcall CLOnlineBase CLONL_InputMask 144 9802
  70. #pragma libcall CLOnlineBase CLONL_ShortMenuSelectVertical 14a 801
  71. #pragma libcall CLOnlineBase CLONL_XFer 150 0802
  72. #pragma libcall CLOnlineBase CLONL_FreeXFerList 156 801
  73. #pragma libcall CLOnlineBase CLONL_SetObscure 15c 001
  74. #pragma libcall CLOnlineBase CLONL_PrintFile 162 801
  75.  
  76. /* Defs for "CLOnlineBase = OpenLibrary ( CLONL_NAME, CLONL_VERSION )" */
  77.  
  78. extern struct Library *CLOnlineBase;
  79.  
  80. #define CLONL_NAME "CONNECTLINE:libs/clonline.library"
  81. #define CLONL_VERSION 5
  82.  
  83. // Definition of a ANSI-Select Entry
  84.  
  85. struct EntryNode
  86. {
  87.     struct MinNode n;    // Exec MinNodes
  88.     char     data[80];    // String to display
  89.     BOOL     bold;
  90.     BOOL     inverse;
  91. };
  92.  
  93. // Colour Definitions for CLONL_Color Command
  94.  
  95. #define COLOR_Black  0
  96. #define COLOR_Red    1
  97. #define COLOR_Green  2
  98. #define COLOR_Yellow 3
  99. #define COLOR_Blue   4
  100. #define COLOR_Pink   5
  101. #define COLOR_Cyan   6
  102. #define COLOR_White  7
  103.  
  104. // Style Definitions for CLONL_Color Command
  105.  
  106. #define STYLE_Normal     0
  107. #define STYLE_Bold       1
  108. #define STYLE_Kursiv     3
  109. #define STYLE_Underlined 4
  110. #define STYLE_Inverse    7
  111.  
  112. // Definitions of types for CLONL_BlueRead()
  113.  
  114. #define TYPE_ASCII  0
  115. #define TYPE_NUMBER 1
  116. #define TYPE_BOOL   2
  117. #define TYPE_SECRET 3
  118.  
  119. // Definitions for CLONL_GetKey ()
  120.  
  121. #define CHAR_CTRLA 1
  122. #define CHAR_CTRLB 2
  123. #define CHAR_CTRLC 3
  124. #define CHAR_CTRLD 4
  125. #define CHAR_CTRLE 5
  126. #define CHAR_CTRLF 6
  127. #define CHAR_BS    8
  128. #define CHAR_TAB   9
  129. #define CHAR_LF       10
  130. #define CHAR_CR    13
  131. #define CHAR_CTRLK 11
  132. #define CHAR_CTRLN 14
  133. #define CHAR_CTRLR 18
  134. #define CHAR_CTRLX 24
  135. #define CHAR_CTRLZ 26
  136. #define CHAR_ESC   27
  137. #define CHAR_DEL   127
  138. #define CHAR_CSI   155
  139.  
  140. #define CHAR_BREAK 1024
  141. #define CHAR_UP    1025
  142. #define CHAR_DOWN  1026
  143. #define CHAR_RIGHT 1027
  144. #define CHAR_LEFT  1028
  145. #define CHAR_EOF   1029
  146.  
  147. // Definitons for Mode for ANSI-Requester
  148.  
  149. #define MODE_SELECT 0 // To select multiple entrys by marking
  150. #define MODE_CHOOSE 1 // To choose ONE entry by cursor left
  151. #define MODE_INHALT 2 // Special - internal
  152.  
  153. // Defines for easyer textoutput
  154.  
  155. #define MSG(txt) CLONL_GetString(txt)
  156. #define PutMSG(txt) CLONL_Printf(MSG(txt))
  157.  
  158. //
  159. // Definition of range for CLONL_FreeRange() and CLONL_ParseExpression()
  160. //
  161.  
  162. struct Range
  163. {
  164.     unsigned long from;
  165.     unsigned long to;
  166.     struct Range *next;
  167. };
  168.  
  169. //
  170. // Definition of Shortmenu for CLONL_AddShortMenu, CLONL_ShortMenuSelect(), CLONL_FreeShortMenu
  171. //
  172.  
  173. struct Shortmenu
  174. {
  175.     char entry [ 80 ];
  176.     char hotkey;
  177.     struct Shortmenu *next;
  178. };
  179.  
  180. //
  181. // Definition for one Mask Entry for CLONL_AddGadget, CLONL_GetGagdet, CLONL_InputMask()
  182. //
  183.  
  184. struct MaskNode
  185. {
  186.     struct MinNode n;
  187.     ulong  MaskType;
  188.     char   Identifier[40];
  189.     char  *Buffer;
  190.     ulong  BufferSize;
  191. };
  192.  
  193. typedef struct MaskNode MaskNode;
  194.  
  195. // Mask-List Definition
  196.  
  197. typedef struct MinList Mask;
  198.  
  199. BOOL  CLONL_Open ( char *catalogname );
  200. void  CLONL_Close ( void );
  201. void  CLONL_FlushInput ( void );
  202. void  CLONL_FlushOutput ( void );
  203. void  CLONL_UpdateUser( void );
  204. void  CLONL_Normal ( void );
  205. void  CLONL_DeleteEOL ( void );
  206. void  CLONL_DeleteLine ( void );
  207. void  CLONL_InsertLine ( void );
  208. void  CLONL_BlueMode ( void );
  209. void  CLONL_GotoXY ( ulong x, ulong y );
  210. void  CLONL_Color ( ulong col, ulong bcol, ulong style );
  211. void  CLONL_ClearScreen ( void );
  212. char *CLONL_BlueRead ( char *str, char *def, ulong len, ulong type, BOOL maske );
  213. BOOL  CLONL_Wait ( void );
  214. void  CLONL_DrawTitle ( void );
  215. BOOL  CLONL_Edit ( char *filename );
  216. struct EntryNode *CLONL_RequesterSelect ( struct MinList *entrys, ulong pos, char *titel, ulong MODE );
  217. void *CLONL_GetLocale ( void );
  218. APTR CLONL_GetCatalog ( void );
  219. struct CLUserShell *CLONL_GetUserShell ( void );
  220. BOOL CLONL_IsTTY ( void );
  221. char *CLONL_GetString ( char *entry );
  222. void CLONL_VPrintf ( char *format, APTR ctl );
  223. void CLONL_Printf ( char *format, ... );
  224. void CLONL_VSPrintf ( char *to, char *format, APTR ctl );
  225. void CLONL_SPrintf ( char *to, char *format, ... );
  226. long CLONL_DoCommand ( char *cmd, char *param);
  227. ulong CLONL_SendMail ( char *abs, char *emp, char *bet, char *filename, char *bezid );
  228. long CLONL_GetKey ( void );
  229. void CLONL_FreeRange ( struct Range *myrange );
  230. struct Range *CLONL_ParseExpression ( char *parsepattern, ulong maximum );
  231. long CLONL_Transfer ( char *filename, char *sendfilename );
  232. char *CLONL_GetUserFullName ( char *name );
  233. long CLONL_GetNameVal ( char *name );
  234. BOOL CLONL_IsKeyPressed ( void );
  235. BOOL CLONL_Continue ( void );
  236. struct Shortmenu *CLONL_AddShortMenu ( struct Shortmenu *menu, char *entry, char hotkey );
  237. void CLONL_FreeShortMenu ( struct Shortmenu *menu );
  238. char CLONL_ShortMenuSelect ( struct Shortmenu *menu );
  239. char *CLONL_TimeToStr ( time_t time, char *str );
  240. time_t CLONL_StrToTime ( char *str, time_t *time );
  241. void CLONL_AddGadget ( Mask ** mask, ulong masktype, char *identifier, char *buffer, ulong buffersize );
  242. MaskNode *CLONL_GetGadget ( Mask * mask, char *identifier );
  243. BOOL CLONL_InputMask ( Mask * mask, char *title );
  244. char CLONL_ShortMenuSelectVertical ( struct Shortmenu *menu );
  245. struct List *CLONL_XFer ( struct List *sendlist, ULONG recflag );
  246. void CLONL_FreeXFerList ( struct List *reclist );
  247. void CLONL_SetObscure ( int isobscure );
  248. BOOL CLONL_PrintFile( char *filename );
  249.  
  250. #endif
  251.